import request from '@/utils/request'

// 查询牵线申请列表
export function listRequest(query) {
  return request({
    url: '/request/request/list',
    method: 'get',
    params: query
  })
}

// 查询牵线申请详细
export function getRequest(requestId) {
  return request({
    url: '/request/request/' + requestId,
    method: 'get'
  })
}

// 新增牵线申请
export function addRequest(data) {
  return request({
    url: '/request/request',
    method: 'post',
    data: data
  })
}

// 修改牵线申请
export function updateRequest(data) {
  return request({
    url: '/request/request',
    method: 'put',
    data: data
  })
}

// 删除牵线申请
export function delRequest(requestId) {
  return request({
    url: '/request/request/' + requestId,
    method: 'delete'
  })
}

// 根据用户ID查询用户详细信息
export function getUserInfo(userId) {
  return request({
    url: '/request/request/user/' + userId,
    method: 'get'
  })
}

// 根据红娘ID查询红娘详细信息
export function getMatchmakerInfo(matchmakerId) {
  return request({
    url: '/request/request/matchmaker/' + matchmakerId,
    method: 'get'
  })
}
